
#ifndef __gui_misc_widgetsH__
#define __gui_misc_widgetsH__

#include "gui_widgets.h"

namespace WtfGui { namespace Widgets {
	class Popup: public WtfEngine::IDynamic, public WidgetContainer {
	public:
		Popup(const Widget::tRef& rWidget);

		void AddChild(const Widget::tRef& rWidget) {
			assert(false);
		};
		void RemoveChild(const Widget::tRef& rWidget) {
			assert(false);
		};

		void Update();

		void OnResize();
		void OnChildResize();

		void Remove();

		void OnMouseDownStart();
		bool OnMouseDown(const iVector2D& vPos, WtfEngine::tMouseButton btn);

		GC_AUTOSIZE(Popup);
	};

	class ColourPicker: public Image {
		fVector4D                   mvSelectedColour;
		WtfEngine::FBOTexture::tRef mrPaletteImage;

	public:
		ColourPicker();

		bool OnMouseDown(const iVector2D& vPos, WtfEngine::tMouseButton btn);
		void OnResize();

		inline const fVector4D& getSelectedColour() const {
			return mvSelectedColour;
		};
	};
}};

#endif
